<?php global $cp_options; ?>
<?php global $app_abbr; ?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
    <head>

        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
        <link rel="profile" href="http://gmpg.org/xfn/11" />

        <title><?php wp_title(''); ?></title>

        <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php echo appthemes_get_feed_url(); ?>" />
        <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1" />

        <?php
        if (is_singular() && get_option('thread_comments'))
            wp_enqueue_script('comment-reply');
        ?>

    <div class="header">
        <div class="header_main">

            <div class="header_main_bg">

                <div class="header_main_res">

                    <div id="logo">

                        <?php if ($cp_options->use_logo) { ?>

                            <?php if ($cp_options->logo) { ?>
                                <a href="<?php echo home_url('/'); ?>"><img src="<?php echo $cp_options->logo; ?>" alt="<?php bloginfo('name'); ?>" class="header-logo" /></a>
                            <?php } else { ?>
                                <a href="<?php echo home_url('/'); ?>"><div class="cp_logo"></div></a>
                            <?php } ?>

                        <?php } else { ?>

                            <h1><a href="<?php echo home_url('/'); ?>"><?php bloginfo('name'); ?></a></h1>
                            <div class="description"><?php bloginfo('description'); ?></div>
                        <?php } ?>
                    </div><!-- /logo -->
                    <div class="adblock">
                        <div id="menu-option">
                            <ul class="menu-top-right">
                                <li class="menu-top-item">
                                    <a href="<?php echo CP_POST_NEW_URL; ?>" class="obtn btn_orange">
                                        Post bài mới
                                    </a>
                                </li>
                                <li class="menu-top-item">
                                    <a href="<?php echo YS_ADD_NEW_PRODUCT; ?>" class="obtn btn_orange"><?php _e('Đăng sản phẩm', APP_TD); ?></a>
                                </li>

                                <?php
                                if (is_user_logged_in()) {
                                    global $current_user;
                                    $current_user = wp_get_current_user();
                                    ?>
                                    <li class="menu-top-item">
                                        <a href="javascript:void(0)" class="obtn btn_orange">
                                            Thông báo <span id="notification">( 5 )</span>
                                        </a>
                                    </li>
                                    <li class="menu-top-avatar">
                                        <img src="<?php echo get_template_directory_uri() . "/includes/ys-upload-avatar/uploads/" . $current_user->ID . "/" . $current_user->ID . ".jpg"; ?>" alt="" class=" avatar  avatar-150  photo user-1-avatar" id="avatar-image">
                                        <ul class="menu-top-avatar-option" id="moreOptionsContainer" style="">
                                            <li class="item-menu">
                                                <a href="<?php echo CP_PROFILE_URL; ?>" class="swap noline">
                                                    <img src="http://test.twoocdn.com/static/42688310964627891/shared/i/blank.gif" class="icon iconProfileSingle" style="vertical-align:-3px;">
                                                    <span>Thông tin cá nhân</span>
                                                </a>
                                            </li>
                                            <li class="item-menu">
                                                <a href="<?php echo CP_DASHBOARD_URL; ?>" class="swap noline">
                                                    <img src="http://test.twoocdn.com/static/42688310964627891/shared/i/blank.gif" class="icon iconSettings" style="vertical-align:-3px;">
                                                    <span>Thiết lập</span>
                                                </a>
                                            </li>
                                            <li id="logoutButtonContainer" class="item-menu">
                                                <a class="swap noline" href="<?php echo cp_logout_url(); ?>" id="logoutLinkResponsive">
    <!--                                                    <img class="icon iconLogout vat" src="http://test.twoocdn.com/static/42688310964627891/shared/i/blank.gif">-->
                                                    <span>Đăng xuất</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                    <?php
                                } else {
                                    ?>
                                    <li class="menu-top-item">
                                        <a href="<?php echo wp_login_url(); ?>" class="obtn btn_orange" style=""><?php _e('Đăng nhập', APP_TD); ?></a>
                                    </li>
                                <?php } ?>
                            </ul> 
                        </div>
                    </div><!-- /adblock -->

                    <div class="clr"></div>

                </div><!-- /header_main_res -->

            </div><!-- /header_main_bg -->

        </div><!-- /header_main -->


        <div class="header_menu">
            <div class="header_menu_res">
                <?php wp_nav_menu(array('theme_location' => 'primary', 'fallback_cb' => false, 'container' => false)); ?>

                <span class="search_from">
                    <form action="http://yourstyle.name/raovat/" method="get" id="searchform" class="">
                        <input name="s" type="text" id="s" tabindex="1" class="editbox_search ui-autocomplete-input" style="" value="What are you looking for?" onfocus="if (this.value == 'What are you looking for?') {
                               this.value = '';
                           }" onblur="if (this.value == '') {
                           this.value = 'What are you looking for?';
                       }" autocomplete="off"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
                        <button class="btn-search" type="submit" tabindex="3" title="Search Ads" id="go" value="search" name="sa">Search Ads</button>
                    </form>       
                </span>
                <!--             <div class="clr"></div>-->
            </div><!-- /header_menu_res -->

        </div><!-- /header_menu -->

    </div><!-- /header -->
</head>




